import request from '@/utils/request'

// 新增角色
export const addRoles = data => request.post('/sys/role', data)

// 查询角色
export const getRoles = params => request.get('/sys/role', { params })

// 修改角色
export const upRoles = data => request.put(`/sys/role/${data.id}`, data)

// 删除角色
export const delRoles = id => request.delete(`/sys/role/${id}`)

// 根据id查询角色
export const getRolesId = id => request.get(`/sys/role/${id}`)

// 给角色分配权限
export const assignPrem = data => request.put('/sys/role/assignPrem', data)
